Inside Macintosh: QuickTime Components

Previous | Chapter Top | Chapter Contents | Next

Sound Data Management

The Movie Toolbox uses your MediaGSetVolume function to tell your media handler when its sound volume has changed.

MediaGSetVolume

The MediaGSetVolume function allows your derived media handler to learn about changes to its sound volume setting.

pascal ComponentResult MediaGSetVolume (MediaHandler mh,
                                          short volume);
mh
Identifies the Movie Toolbox's connection to your derived media handler.
volume
Contains the media's current volume setting. This value is represented as a 16-bit, fixed-point number. The high-order 8 bits contain the integer portion; the low-order 8 bits contain the fractional part. Volume values range from -1.0 to 1.0. Negative values play no sound but preserve the absolute value of the volume setting.
The Movie Toolbox scales your media's volume in light of the track's and movie's volume settings, but it does not take into account the system speaker volume setting. This value is appropriate for use with the Sound Manager.

DESCRIPTION

The Movie Toolbox uses this function to tell your derived media handler about changes to your media's sound volume.

Your derived media handler should support this function if it can play sounds.

RESULT CODES

Any Component Manager result code


© 1997 Apple Computer, Inc.

Previous | Chapter Top | Chapter Contents | Next